This invention relates to processing of bitmap raster data on a host processor prior to dispatch to a printer and, more particularly, to a host processor""s printer driver which includes individual processing modules whose functions can be selectively turned on or off, in dependence upon processing efficiency decisions.
A device driver is a software module whose function is to isolate details of operating the device from both application programs and the operating system on a host computer. In general, when a printer is shipped, a disk or disks accompany a printer and include printer driver code to be installed on the host computer. Such drivers are responsible for converting requests from an application program into a stream of commands that can be understood and executed by the printer.
Printer drivers handle text, vectors and raster images in different ways. Raster images are pixel bitmaps that are defined by describing the color of every pixel in the image. Because of the amount of data needed to describe a raster bitmap, considerable processing time is required to prepare such data for transmission to a connected printer. The degree of processing that a printer driver performs on the raster bitmap data coming from an application program varies, depending upon the capabilities of the printer and the requirements of the user. Examples of operations performed upon a raster bitmap image by a printer driver include the following:
Color/space transformationsxe2x80x94wherein red/green/blue values are transformed to black, cyan, magenta and yellow values.
Image processingxe2x80x94wherein contrast correction and color balancing actions are performed.
Bit depth conversionxe2x80x94wherein halftoning and/or other dithering actions are carried out to improve image gray level presentation.
Image rotationxe2x80x94wherein an image is rotated by a given angle.
Scalingxe2x80x94wherein an image is increased in size or decreased in size by, for instance, pixel replication, resolution synthesis or a further scaling algorithm.
Clippingxe2x80x94wherein only a region of an image is to be transmitted to a printer.
Compressionxe2x80x94wherein image data is compressed to reduce the amount of required data to be transmitted to the printer.
Depending upon the nature of a print job, each of the above processing actions can occur in the printer driver, the operating system, the printer or not at all.
From a speed of processing point of view, the slowest function carried out by the host computer is transmission of the print data to the printer. Processing actions which occur within the host computer or within the printer occur at a much faster rate than the available data transmission speed between the host computer and the printer. Accordingly, if the amount of the image data that is transmitted to the printer can be minimized, the resulting performance improvements can be substantial.
Historically, the task of processing raster bitmap data in a printer driver has been accomplished using a monolithic, static piece of code. Such printer drivers often combine processing steps for efficiency purposes. For instance, in many current printer drivers, scaling, dithering and compression are performed simultaneously. Thus, modifying any one of these procedures can involve a fairly substantial rewrite of the entire printer driver code. Further, because the features of the driver and printer are determined at design time, the printer driver code is xe2x80x9cstaticxe2x80x9d. Thus, the driver is written to match the capabilities of a specific device. For instance, assumptions made about the capabilities of the host computer""s speed, network bandwidth, etc., become fixed and once the printer driver has been released, these assumptions cannot be changed. As are result, if new image processing procedures become available or hardware improvements are made which potentially improve the efficiency of bitmap processing, the entire raster processing part of a printer driver must be reviewed and, potentially, rewritten to accommodate the improvements. Such a rewrite action is both expensive and time consuming.
Accordingly, it is an object of this invention to provide a printer driver with the capability of ready modification of its raster processing code, without a need for a rewrite of the entire raster code.
It is another object of this invention to provide an improved printer driver procedure with the capability to configure a raster bitmap processing pipeline to maximize processing efficiency of the raster bitmap.
It is yet another object of this invention to provide an improved printer driver that is capable of taking into account performance capabilities of both a host computer and a connected printer, when deciding on an optimum configuration of a processing pipeline to handle raster bitmap images.
A configurable printer driver, resident on a host (source) computer is enabled to respond to a print job request by manipulating a source bitmap prior to its transmission to a destination printer. The printer driver includes plural, substantially independent, bitmap manipulation procedures which may be linked to provide an image processing pipeline. The method of the invention initially determines which bitmap manipulations should be performed on the source computer, to minimize the quantity of bitmap data to be dispatched to the destination printer or to maximize processing efficiency of the print job request. Based upon the aforesaid determination, a bitmap processor pipeline is assembled from stored bitmap manipulation procedures to perform manipulations of the source bitmap in the source computer. The bitmap manipulations are then performed, using the assembled bitmap processor pipeline. The resulting processed raster bitmap is then transferred to the destination printer.